﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using CObject;
using Objects.CMT;

public partial class Admin_Questions : Objects.cPage
{
    /// <summary>
    /// Page load event
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.Page.IsPostBack)
        {
            this.BindQuestionList();
        }
    }
    #region Private Functions

    /// <summary>
    /// Function to get the list
    /// of existing Questions.
    /// </summary>
    /// <returns>Datatable containing the list of Questions.</returns>
    private DataTable GetQuestionList()
    {
       Questions questionInfo = new Questions();
       return questionInfo.GetQuestionInfo();
        
    }
    /// <summary>
    /// Function to bind list of Questions to 
    /// the grid view.
    /// </summary>
    private void BindQuestionList()
    {
        this.gvQuestionList.DataSource = this.GetQuestionList();
        this.gvQuestionList.DataBind();
    }
    #endregion

}